<template>
	<div>
		<el-button type="primary" @click="goBack()">返回</el-button>
		<el-button type="primary" @click="flag = 1">this的指向问题</el-button>
		<input type="text" v-model="key" @keyup.f2="handle" placeholder="自定义按键修饰符的使用" />
		<!-- <el-input  ></el-input> -->
		<router-link :to="{ name: 'array' }">
			<el-button type="primary">数组array</el-button>
		</router-link>
		<transition name="el-fade-in-linear">
			<thisd></thisd>
		</transition>
		<el-divider></el-divider>
		<h1>组件start</h1>
		<comf></comf>
		<el-divider></el-divider>
		<comp></comp>
		<h1>组件end</h1>
		<el-divider></el-divider>
		<click-switch />
		<el-divider></el-divider>
		<vmodle></vmodle>
		<el-divider></el-divider>
		<promise></promise>
		<el-divider></el-divider>
		<aboutvue></aboutvue>
		<el-divider></el-divider>
		<plugin></plugin>
		<el-divider></el-divider>
	</div>
</template>

<script>
	import clickSwitch from './clickSwitch'
	import thisd from './this'
	import vmodle from './vmodel'
	import promise from './promise'
	import aboutvue from './aboutvue'
	import plugin from './plugin'
	import comf from './comf'
	import comp from './comp'
	export default {
		provide() {
			return {
				indexaa: 'index内的'
			}
		},
		data() {
			return {
				key: '',
				arr: [1, 2, 3, 4, 5],
				flag: 0
			}
		},
		components: {
			clickSwitch,
			thisd,
			vmodle,
			promise,
			aboutvue,
			plugin,
			comf,
			comp
		},
		methods: {
			goBack() {
				this.$router.go(-1)
				// function Fn(name) {
				//   this.name = name
				// }
				// let a = new Fn(a)
				// console.log(a.name);
				// poptype
			},
			handle() {
				console.log('aaa')
			}
		}
	}
</script>

<style lang="scss" scoped></style>
